package com.zxs.order.controller;

import com.zxs.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import parm.PageParam;
import utils.R;

/**
 * @author zxs
 * *9 20:48
 */
@RestController
@RequestMapping("order")
public class AdminOrderController {

    @Autowired
    private OrderService orderService;

    @PostMapping("admin/list")
    public Object adminList(@RequestBody PageParam pageParam){

        return orderService.adminList(pageParam);
    }

    @PostMapping("admin/check")
    public R check(@RequestBody Integer productId){
        return orderService.check(productId);
    }

}
